import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
// 存储时间戳的键名
const TokenTimeStamp = 'time_stamp_token'
// 获取token
export function getToken() {
  return Cookies.get(TokenKey)
}
// 设置token
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
// 清空token
export function removeToken() {
  return Cookies.remove(TokenKey)
}
// 获取cookies中的token存储的时间
export function getTokenTimeStamp() {
  return Cookies.get(TokenTimeStamp)
}
// 获取cookies中的token
export function setTokenTimeStamp(time) {
  return Cookies.remove(TokenTimeStamp, time)
}
